# Title: Replication Package for "Does the Messenger Shape the Message’s Effect? Race, Black Lives Matter, and the Efficacy of Social Movement Messages"

Article Authors: 
Paul Testa, Tarah Williams, Kylee Britzman, Karra McGray Gibson, Matthew Hibbing

Corresponding Author: 
Paul Testa (paul_testa@brown.edu)

README Author: 
Paul Testa

Journal: 
The Journal of Politics

Date: 
July 17, 2025

## Contents:

├── README.md                           # This file
├── 01_data/
│   ├── codebook.pdf                    # Codebook for df_mtr.rda & df_qr.rda
│   ├── CFD 2.0.3 Norming Data and Codebook.xlsx   # CFD norming data
│   ├── df_mtr.rda                      # Study 1 data (MTurk Sample)
│   ├── df_qr.rda                       # Study 2 data (Qualtrics Sample)
├── 02_code/
│   ├── 01_libraries.R                  # Loads required R packages
│   ├── 02_functions.R                  # Custom functions used in analysis
│   ├── 03_jop_replicate_results.qmd    # Quarto file to replicate paper results
│   ├── 03_jop_replicate_results.R      # R script version (optional)
│   ├── 03_jop_replicate_results.pdf    # Rendered output from replication code
├── 03_figures/
│   ├── eps/                            # .eps versions of figures
│   ├── pdf/                            # .pdf versions of figures
│   ├── tiff/                           # .tiff versions of figures
├── 04_tables/
│   ├── *.tex                           # LaTeX tables in paper and appendix


Software Requirements
Operating System:

macOS Sequoia 15.5 (replication should work on other platforms with R 4.5.0+)

Software:

R (version 4.5.0)

RStudio (version 2025.5.0.496 or later)

R Packages Required:
haven (2.5.5), labelled (2.14.1), tidyverse (2.0.0), DeclareDesign (1.0.10), purrr (1.0.4), car (3.1.3), Hmisc (5.2.3), easystats (0.7.4), pbapply (1.7.2), vader (0.2.1), tidytext (0.4.2), widyr (0.1.5), knitr (1.50),  ggridges (0.5.6), ggpubr (0.6.0), gtsummary (2.2.0), kableExtra (1.4.0), patchwork (1.3.0), texreg (1.39.4), readxl (1.4.5)

Install all packages using:

```{r}
install.packages(c(
  "haven", "labelled", "tidyverse", "DeclareDesign", "purrr", "car",
  "Hmisc", "easystats", "pbapply", "vader", "tidytext", "widyr", "knitr",
  "ggridges", "ggpubr", "gtsummary", "kableExtra", "patchwork", "texreg", "readxl"
))
```

Or run the 01_libraries.R script to install and load them.

## Software Requirements

Computing Environment: MacOS Sequoia 15.5

Software: R (Version 4.5.0) R Studio (Version 2025.5.0.496)

Required Libraries: 


## Replication Instructions

To reproduce the results presented in the paper:

1. Download the replication files

2. Open RStudio (recommended) or R, and set your working directory to the 02_code/

3. Install the required packages

4. Run the replication analysis via either:

- the Quarto file: Open and render 02_code/03_jop_replicate_results.qmd

- or the base R script: Set working directory and source 02_code/03_jop_replicate_results.R

This will:

- Load required packages and custom functions

- Import and process the data

- Estimate all models reported in the main text and appendix

- Generate all tables and figures in the 04_tables/ and 03_figures/ directories

- Save a PDF of the results (03_jop_replicate_results.pdf)

Notes:

Study 1 and 2 data are included as .rda files. Variable coding and sample details are described in the manuscript and code comments.

The CFD norming data are included as originally published, with attribution.

If you encounter issues or have questions about the replication materials, feel free to contact Paul Testa at the email above.


## Rendering to pdf

To knit the .qmd replication file to PDF, you need to:

1. Install Quarto (if not already installed)

    - Download and install from: https://quarto.org/docs/get-started/

Or install from R with:

```{r}
install.packages("quarto")
```

2. Install a LaTeX distribution

To render to PDF, you must have LaTeX installed. Recommended options:

macOS: MacTeX (https://www.tug.org/mactex/)

Windows: TinyTeX (recommended for minimal setup)

Linux: Install TeX Live via your package manager

To install TinyTeX from R:

```{r}
install.packages("tinytex")
tinytex::install_tinytex()
```


3. Knit the file

Once Quarto and LaTeX are installed:

Open 02_code/03_jop_replicate_results.qmd in RStudio

Click the Render button at the top of the editor, or run:

```{r}
quarto::quarto_render("02_code/03_jop_replicate_results.qmd", output_format = "pdf")
```

This will produce a PDF copy of the results in the same directory.

## References

Ma, Debbie S, Joshua Correll and Bernd Wittenbrink. 2015. “The Chicago face database: A free stimulus set of faces and norming data.” Behavior Research Methods 47(4):1122–1135.





